package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.PopulationShenbaoMapper;
import com.ruoyi.system.domain.PopulationShenbao;
import com.ruoyi.system.service.IPopulationShenbaoService;
import com.ruoyi.common.core.text.Convert;

/**
 * 户口申报Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-10-15
 */
@Service
public class PopulationShenbaoServiceImpl implements IPopulationShenbaoService 
{
    @Autowired
    private PopulationShenbaoMapper populationShenbaoMapper;

    /**
     * 查询户口申报
     * 
     * @param id 户口申报主键
     * @return 户口申报
     */
    @Override
    public PopulationShenbao selectPopulationShenbaoById(Long id)
    {
        return populationShenbaoMapper.selectPopulationShenbaoById(id);
    }

    /**
     * 查询户口申报列表
     * 
     * @param populationShenbao 户口申报
     * @return 户口申报
     */
    @Override
    public List<PopulationShenbao> selectPopulationShenbaoList(PopulationShenbao populationShenbao)
    {
        return populationShenbaoMapper.selectPopulationShenbaoList(populationShenbao);
    }

    /**
     * 新增户口申报
     * 
     * @param populationShenbao 户口申报
     * @return 结果
     */
    @Override
    public int insertPopulationShenbao(PopulationShenbao populationShenbao)
    {
        populationShenbao.setCreateTime(DateUtils.getNowDate());
        return populationShenbaoMapper.insertPopulationShenbao(populationShenbao);
    }

    /**
     * 修改户口申报
     * 
     * @param populationShenbao 户口申报
     * @return 结果
     */
    @Override
    public int updatePopulationShenbao(PopulationShenbao populationShenbao)
    {
        return populationShenbaoMapper.updatePopulationShenbao(populationShenbao);
    }

    /**
     * 批量删除户口申报
     * 
     * @param ids 需要删除的户口申报主键
     * @return 结果
     */
    @Override
    public int deletePopulationShenbaoByIds(String ids)
    {
        return populationShenbaoMapper.deletePopulationShenbaoByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除户口申报信息
     * 
     * @param id 户口申报主键
     * @return 结果
     */
    @Override
    public int deletePopulationShenbaoById(Long id)
    {
        return populationShenbaoMapper.deletePopulationShenbaoById(id);
    }
}
